package sanoj;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Font;
import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class Calculadora extends JFrame {
	
	private JButton btsomar;
	private JButton btsubtrair;
	private JButton btmultiplicar;
	private JButton btdividir;
	private JButton btce;
	private JButton btback;
	private JButton btigual;
	private JButton btponto;
	
	private JButton bt1;
	private JButton bt2;
	private JButton bt3;
	private JButton bt4;
	private JButton bt5;
	private JButton bt6;
	private JButton bt7;
	private JButton bt8;
	private JButton bt9;
	private JButton bt0;
	
	private JTextField tfcalculadora;
	
	private Container container;
	
	public Calculadora(){
		super ("Calculadora");
		
		Container n = new JPanel();
        n.setLayout(new GridLayout(4,4,7,7));
        
        JTextField display = new JTextField();
        display.setFont(new Font("serif", Font.PLAIN, 26));
        
        Container c = getContentPane();
        c.add(BorderLayout.NORTH, display);
        c.add(BorderLayout.CENTER,n);
        
        n.add(new  JButton("7"));
        n.add(new  JButton("8"));
        n.add(new  JButton("9"));
        n.add(new  JButton("/"));
        n.add(new  JButton("4"));
        n.add(new  JButton("5"));
        n.add(new  JButton("6"));
        n.add(new  JButton("*"));
        n.add(new  JButton("1"));
        n.add(new  JButton("2"));
        n.add(new  JButton("3"));
        n.add(new  JButton("-"));
        n.add(new  JButton("0"));
        n.add(new  JButton("."));
        n.add(new  JButton("="));
        n.add(new  JButton("+"));
 
        //setLocationRelativeTo(null);
        setSize(280,400);
        this.setVisible(true);
   
	}

	public static void main(String[] args) {
		new Calculadora();

	}

}
